package com.zh.web.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;

@Getter
public enum ProtectedPermission {

    ALL(1, "all", "全部权限"),
    SELECT(2001, "select", "查询权限"),
    INSERT(2002, "insert", "新增权限"),
    DELETE(2003, "delete", "删除权限"),
    UPDATE(2004, "update", "修改权限");
    @EnumValue
    private final Integer permissionCode;
    @JsonValue
    private final String permissionName;

    private final String permissionDesc;

    ProtectedPermission(Integer permissionCode, String permissionName, String permissionDesc) {
        this.permissionCode = permissionCode;
        this.permissionName = permissionName;
        this.permissionDesc = permissionDesc;
    }
}
